# Contributor:
# Maintainer:
pkgname=indent
pkgver=2.2.12
pkgrel=1
pkgdesc="An indenting utility"
url="https://www.gnu.org/software/indent/"
arch="all"
license="GPL-3.0-or-later BSD"
makedepends="gettext-dev"
options="!check" #texinfo
subpackages="$pkgname-doc $pkgname-lang"
source="https://ftp.gnu.org/gnu/indent/indent-$pkgver.tar.xz"

prepare() {
	cd "$builddir"
	default_prepare
	update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--without-included-gettext \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--without-texinfo
	make SUBDIRS="intl po src"
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make SUBDIRS="intl po src man" DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true
}

sha512sums="
dbe73bd3729074825f9f5b4241a4c539ad32069df56511963417caf0351ff9ec5edd77e9580338301c8abf89ab9c0592bc7e82c14eec7450c496259d7e9045dd  indent-2.2.12.tar.xz
"
